package com.mew.chess.core.game.shbz.game.common;

import com.mew.common.vo.UserSessionVO;
import com.zebra.common.ByteBufUtils;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Arrays;
import java.util.HashMap;


@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class FishUserBO extends UserSessionVO {

    private long bet ; //
    private long payment ; //

    private long artilleryBet ; //押注下标

    private byte cannonId = 1; // 炮台ID
    private byte betNo = 1; //押注下标

    private int[] artillerys = new int[5]; //押注下标

    private HashMap<Integer ,HashMap<Integer,FishLog>> fishLogMap = new HashMap<>();  //押注  鱼

    @Override
    public void write(ByteBuf b) {
        super.write(b);

        ByteBufUtils.writeInt(b, getGameSession().getSeatNo());
        ByteBufUtils.writeByte(b, this.cannonId);
        ByteBufUtils.writeByte(b, this.betNo);
        ByteBufUtils.writeIntArray(b, this.artillerys);
    }

}
